<?php
	$tmp_str = @file_get_contents("php://input");
	echo($tmp_str);
	$ext = $_GET['ext'];
	if( !empty($tmp_str) ){
		$path = "./uploads/";
		$filename = time().'.'.$ext;
		$handle = fopen( $path.$filename, "w" );
		if( fwrite($handle,$tmp_str) === false ){
			echo "Failed";
		}else{
		 	echo $path.$filename;
		}
		fclose($handle);
	}
